<!--

/*
* Copyright (C) 2005-2013 University of Sydney
*
* Licensed under the GNU License, Version 3.0 (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the License at
*
* http://www.gnu.org/licenses/gpl-3.0.txt
*
* Unless required by applicable law or agreed to in writing, software distributed under the License
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/

/**
* Timemap = Mapstraction+Timeline
*
* @author      Artem Osmakov   <artem.osmakov@sydney.edu.au>
* @copyright   (C) 2005-2013 University of Sydney
* @link        http://Sydney.edu.au/Heurist
* @version     3.1.0
* @license     http://www.gnu.org/licenses/gpl-3.0.txt GNU License 3.0
* @package     Heurist academic knowledge management system
* @subpackage  !!!subpackagename for file such as Administration, Search, Edit, Application, Library
*/

-->

<html>
<head>

<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title></title>

<link rel="stylesheet" type="text/css" href="../../external/yui/2.8.2r1/build/menu/assets/skins/sam/menu.css">
<link rel="stylesheet" type="text/css" href="../../external/yui/2.8.2r1/build/fonts/fonts-min.css" />

<!-- yui layout -->
<link rel="stylesheet" type="text/css" href="../../external/yui/2.8.2r1/build/reset-fonts-grids/reset-fonts-grids.css">

<!-- Skin CSS files resize.css must load before layout.css -->
<link rel="stylesheet" type="text/css" href="../../external/yui/2.8.2r1/build/assets/skins/sam/resize.css">
<link rel="stylesheet" type="text/css" href="../../external/yui/2.8.2r1/build/assets/skins/sam/layout.css">
<!-- Utility Dependencies -->
<script src="../../external/yui/2.8.2r1/build/yahoo-dom-event/yahoo-dom-event.js"></script>
<script src="../../external/yui/2.8.2r1/build/dragdrop/dragdrop-min.js"></script>
<script src="../../external/yui/2.8.2r1/build/element/element-min.js"></script>
<!-- Optional Animation Support
<script src="../../external/yui/2.8.2r1/build/animation/animation-min.js"></script> -->
<!-- Optional Resize Support -->
<script src="../../external/yui/2.8.2r1/build/resize/resize-min.js"></script>
<!-- Source file for the Layout Manager -->
<script src="../../external/yui/2.8.2r1/build/layout/layout-min.js"></script>

<link rel="stylesheet" type="text/css" href="../../external/yui/2.8.2r1/build/menu/assets/skins/sam/menu.css">

<!-- yui menu -->
<script type="text/javascript" src="../../external/yui/2.8.2r1/build/container/container_core-min.js"></script>
<script type="text/javascript" src="../../external/yui/2.8.2r1/build/menu/menu-min.js"></script>


<!-- timemap/timeline scripts -->

	<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>

	<script type="text/javascript">
			RelBrowser = {
						//baseURL: "http://heuristscholar.org/h3-ao/",
						pipelineBaseURL: "../"
			};

	//Timeline_urlPrefix = RelBrowser.baseURL + "external/timemap.2.0/lib/";
//	Timeline_urlPrefix = "http://heuristscholar.org/h3-ao/external/timemap.2.0/lib/timeline/";
//	Timeline_ajax_url = "http://heuristscholar.org/h3-ao/external/timemap.2.0/lib/timeline/timeline_ajax/simile-ajax-api.js";

	Timeline_urlPrefix = "../../external/timemap.2.0/lib/timeline/";
	Timeline_ajax_url = "../../external/timemap.2.0/lib/timeline/timeline_ajax/simile-ajax-api.js";

/*      Timeline_ajax_url   = RelBrowser.baseURL + "external/timeline_2.3.0/timeline_ajax/simile-ajax-api.js";
      Timeline_urlPrefix  = RelBrowser.baseURL + "external/timeline_2.3.0/timeline_js/";
      Timeline_parameters = 'bundle=true'; */

			var showMap, HRST;
	</script>

<link href="../../external/jquery/jquery-ui-1.8.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../external/jquery/jquery-1.5.1.min.js"></script>
<script type="text/javascript" src="../../external/jquery/jquery-ui-1.8.13.custom.min.js"></script>

<!-- <script type="text/javascript" src="../../external/timemap.2.0/src/iso8601.js"></script>  fix issue with time parsing -->

<!-- <script type="text/javascript" src="../../external/timemap.2.0/lib/jquery-1.4.4.min.js"></script> -->
<script type="text/javascript" src="../../external/timemap.2.0/lib/mxn/mxn.js?(googlev3)"></script>

<script type="text/javascript" src="../../external/timemap.2.0/lib/markerclusterer.js"></script>
<!--
<script type="text/javascript" src="../../external/timemap.2.0/lib/timeline-2.3.0.js"></script>
<script type="text/javascript" src="../../external/timemap.2.0/lib/timeline-1.2.js"></script>

<script type="text/javascript" src="../../external/timemap.2.0/lib/timeline-2.3.0.js"></script>
-->
<script type="text/javascript" src="../../external/timemap.2.0/lib/timeline/timeline-api.js?bundle=true"></script>

<script src="../../external/timemap.2.0/src/timemap.js" type="text/javascript"></script>
<script src="../../external/timemap.2.0/src/param.js" type="text/javascript"></script>
<script src="../../external/timemap.2.0/src/manipulation.js" type="text/javascript"></script>
<script src="../../external/timemap.2.0/src/loaders/xml.js" type="text/javascript"></script>
<script src="../../external/timemap.2.0/src/loaders/kml.js" type="text/javascript"></script>

<script src="../../viewers/map/mapping.js" type="text/javascript"></script>
<script src="../../common/js/temporalObjectLibrary.js" type="text/javascript"></script>

<link rel="stylesheet" type="text/css" href="../../common/css/global.css">

<!--
<script src="{$urlbase}js/gmapimage.js" type="text/javascript"/>
-->
<style type="text/css">
/*body {
	font: 10px Verdana, Geneva, sans-serif;
}*/
#map {
	margin-bottom: 8px;
	overflow: hidden;
	border: 1px solid #320a0a;
}
#map.image {
	height: 512px;
	margin-bottom: 17px;
}
#map.full {
	height: 100%;
}
#map.entity-map {
	height: 180px;
}
#map.hide {
	display: none;
}
.map-description {
	margin-bottom: 20px;
}

#timeline {
	border: 1px solid #320a0a;
	overflow-x:hidden;
	overflow-y:auto;
}

#timeline-zoom {
	position: absolute;
	top: 3px;
	left: 3px;
	z-index: 2000;
	visibility: visible;
}
#timeline-zoom div {
	cursor: pointer;
}
#timeline.hide, #timeline-zoom.hide {
	position: absolute;
	visibility: hidden;
}

#timeline.entity-timeline .timeline-event-icon,
#timeline.entity-timeline .timeline-event-label,
#timeline.entity-timeline .timeline-event-tape {
	cursor: default;
}

#rec_popup{
	color:green;
	display:inline-block;
	text-align:left;
	padding-left:3px;
	padding-top:3px;
}

.popup_body{
	color:green;
	text-align:left;
}


/* for transparency slider*/
.ui-slider .ui-slider-handle {width: 0.25em;height:0.75em;}
.ui-slider-horizontal .ui-slider-handle {
  						margin-left: -0.3em;
    					top: -0.3em;
}

.menuButton {
	position: absolute;
	right:2px;
	top:0px;

	background-image: url("../../common/images/blue-down-triangle.png") !important;
	background-position: right center;
	background-repeat: no-repeat;

	height: 20px !important;
	padding: 0 26px 0 0;
	margin: 5px;
	text-align: left;
	width: 60px;
}

/* it reduced the default size of header for yui layout */
.yui-skin-sam .yui-layout .yui-layout-hd {
    height:20px;
}

.yui-skin-sam .yui-layout .yui-layout-unit div.yui-layout-hd h2{
    padding: 0px 4px;
    font-size: 12px;
    line-height: 18px;
}

/* from global.css
#mapButton {
	background-image: url("../../common/images/b_Map.png");
	background-position: 2px 2px;
	background-repeat: no-repeat;
	padding: 0 5px 0 26px !important;
	white-space: nowrap;
	margin:3px;
	border: none;
	position: absolute;
    right: 2px;
}
button {height:auto !important;
	text-transform: uppercase !important;
	display:inline-block !important;
	color: #666;
	cursor: pointer !important;
	font-weight:bold !important;
	border:1px solid RGBA(0,0,0,0.2) !important;
	-moz-border-radius:3px !important;
	-webkit-border-radius:3px !important ;
	border-radius:3px !important;
	padding:0 3px !important ;
	height:20px !important ;
	line-height:13px !important;
	font: 10px arial,helvetica,clean,sans-serif;
}
.button:hover, button:hover, input[type="button"]:hover {
	background-color:RGBA(0,0,0,0.1) !important;
	border:1px solid RGBA(0,0,0,0.4) !important;
	box-shadow: 0 1px 2px RGBA(0,0,0,0.4) inset !important;
	text-decoration:none !important;
	color:#000 !important;
}


#errorMsg{
	width:100%;
	height:99%;
	background-color:#FFF;
	text-align:center;
	vertical-align: middle;
}
#errorMsg span, .errorMsg span, div#errorMsg span{
	background-color: rgba(100, 100, 100, 0.6);
	background:-moz-linear-gradient(center top , rgba(100, 100, 100, 0.6), rgba(100, 100, 100, 0.9)) repeat scroll 0 0 transparent;
	background:-webkit-gradient(linear, left top, left bottom, from(rgba(100, 100, 100, 0.6)), to(rgba(100, 100, 100, 0.9)));
	border: 1px solid #999;
	-moz-border-radius:3px;
	-webkit-border-radius:3px;
	border-radius:3px;
	padding:3px;
	font-size:14px;
	color:#FFF;
}

.wrap {
	display:table;
	width:100%;
	height:100%;
	-webkit-border-bottom-right-radius:5px;
	border-bottom-right-radius: 5px;
	-moz-border-radius-bottomright:5px;
	margin:6px;
}
.wrap div {
	display:table-cell;
}
.wrap div iframe{
	width:100%;
	height:99%;
	border:0;
}
*/
</style>

</head>

<body class="yui-skin-sam">

		<script type="text/javascript">
		 	HRST = top.HEURIST;
		</script>
		<script type="text/javascript" src="../../common/js/utilsLoad.js"></script>
		<script type="text/javascript" src="../../common/js/utilsUI.js"></script>
		<script type="text/javascript" src="../../viewers/map/showMap.js"></script>

		<div id="toolbarcontainer">
				<div id="toolbardiv" style="height:30px;">
					<div style="padding:5px;display:inline-block;">
							<select id="rbMapUseSelectedRecords" name="showmapmode" onChange="showMap.setQueryMode(event)" style="width:90px">
								<option value="all" selected="selected">All on page</option>
								<option value="selected">Selected only</option>
								<option value="main">Query result</option>
							</select>
					</div>
					<label id="lblBackground">Background:</label>
					<select id="cbLayers" style="display:inline-block;" onchange="showMap.loadLayer(event)"></select>
					<span id="errorSign"></span>
					<span id="messageSign"></span>
					<button id="menuButton" class="menuButton button" onmouseover="publishMap()">Menu</button>

				</div>
		</div>

		<div id="mapcontainer">
				<div id="map" class="full"></div>
		</div>

		<div id="timelinecontainer" style="height:100%;overflow-y:auto;">
				<div id="timeline" style="height:99%"></div>
				<div id="timeline-zoom"></div>
		</div>

		<div id="mapreportcontainer">
		</div>

<script type="text/javascript">

	//
	//  starts initialization on load completion of this window
	function loadHandler(){

		HRST = top.HEURIST; //alias that are in use in showMap.js

		RelBrowser.baseURL = HRST.basePath;
		RelBrowser.iconBaseURL =  HRST.iconBaseURL;
		RelBrowser.database = HRST.database.name;

		//Timeline.urlPrefix = HRST.baseURL + "external/timemap.2.0/lib/timeline/"; //"external/timemap.2.0/lib/";
		//Timeline.urlPrefix = HRST.baseURL + "external/timemap.2.0/lib/";

		window.showMap = new ShowMap();
	}

	//
	//
	function publishMap(){
		if(window.showMap && !window.showMap.isEmpty()){
			window.showMap.showMenu();
		}
	}

	//YAHOO.util.Event.addListener(window, "load", loadHandler );
	YAHOO.util.Event.onDOMReady(loadHandler);

</script>

</body>
</html>
